package com.study.service;

import com.study.dao.BookDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.inject.Inject;

/**
 * @author wuwenbo
 * @date 2020/3/27 - 17:18
 */
@Service
public class BookService {

//    @Autowired
    @Resource(name="bookDAO2")
//    @Inject
    @Qualifier("bookDAO")
    private BookDAO bookDAO2;

    public void print(){
        System.out.println(bookDAO2);
    }

    @Override
    public String toString() {
        return "BookService{" +
                "bookDAO=" + bookDAO2 +
                '}';
    }
}
